package com.yangst.service.feign.controller;

import com.yangst.service.feign.service.HelloFeignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by YST on 2018/4/17.
 */
@RestController
public class HelloController {
    @Autowired
    private HelloFeignService helloFeignService;

    @RequestMapping(value = "/hi",method = RequestMethod.GET)
    public String hi(@RequestParam String name){
        return helloFeignService.hiService(name);
    }

    @Value("${foo}")
    String foo;
    @RequestMapping(value = "/hifoo")
    public String hifoo(){
        return foo;
    }
}
